package org.dwpd.controller.inbox;

import org.dwpd.domain.common.Result;
import org.dwpd.service.inbox.InBoxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/inbox")
@RestController
public class InBoxController {

    @Autowired
    private InBoxService inBoxService;

    /**
     * 收件箱信息-获取收件人为用户本身的收件箱历史信息以及未读信息
     */
    @GetMapping("/getHistoryMessageForSelf")
    public Result getHistoryMessageForSelf() {
        return inBoxService.getHistoryMessageForSelf();
    }

    /**
     * 收件箱信息-获取当前用户所有参与过任务的用户帖
     */
    @GetMapping("/getOnSeatMessageForSelf")
    public Result getOnSeatMessageForSelf() {
        return inBoxService.getOnSeatMessageForSelf();
    }
}
